CREATE TABLE [dbo].[TDMOVI_BANC]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[AA_BNCO] [dbo].[TD_VC_004] NOT NULL,
[MM_BNCO] [dbo].[TD_VC_002] NOT NULL,
[TI_MOVI_BANC] [dbo].[TD_VC_001] NOT NULL,
[NU_COMP_BANC] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDMOVI_BA__NU_SE__4EFDAD20] DEFAULT ((0)),
[TI_ENTI] [dbo].[TD_VC_001] NULL,
[CO_ENTI] [dbo].[TD_VC_020] NULL,
[TI_DOCU_ENTI] [dbo].[TD_VC_003] NULL,
[NU_DOCU_ENTI] [dbo].[TD_VC_020] NULL,
[CO_MONE_DOCU] [dbo].[TD_VC_003] NULL,
[FE_DOCU] [dbo].[TD_DT_001] NULL,
[IM_DOCU] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDMOVI_BA__IM_DO__4FF1D159] DEFAULT ((0)),
[IM_SALD_DOCU] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDMOVI_BA__IM_SA__50E5F592] DEFAULT ((0)),
[IM_SALD_CONV] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDMOVI_BA__IM_SA__51DA19CB] DEFAULT ((0)),
[IM_DETA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDMOVI_BA__IM_DE__52CE3E04] DEFAULT ((0)),
[IM_DETA_NEGA] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDMOVI_BA__IM_DE__53C2623D] DEFAULT ((0)),
[IM_CONV_DOCU] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDMOVI_BA__IM_CO__54B68676] DEFAULT ((0)),
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[ST_CIER_DOCU] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TDMOVI_BA__ST_CI__55AAAAAF] DEFAULT ('N'),
[CO_LIQU] [dbo].[TD_VC_020] NULL,
[NU_RECI_COBR] [dbo].[TD_VC_010] NULL,
[FE_RECI_COBR] [dbo].[TD_DT_001] NULL,
[FE_VENC] [dbo].[TD_DT_001] NULL,
[NU_SECU_PRPA] [dbo].[TD_IN_001] NULL CONSTRAINT [DF__TDMOVI_BA__NU_SE__5792F321] DEFAULT ((0)),
[FE_PROG] [dbo].[TD_DT_001] NULL,
[FE_EMIS] [dbo].[TD_DT_001] NULL,
[FA_CAM1_EMIS] [dbo].[TD_NU_015_006] NULL,
[NU_CORR_COMP] [dbo].[TD_VC_020] NULL,
[IM_DETR_CALC] [dbo].[TD_NU_016_004] NULL CONSTRAINT [DF__TDMOVI_BA__IM_DE__5887175A] DEFAULT ((0)),
[TI_MOVI_OPER] [dbo].[TD_VC_001] NULL,
[CO_ORDE_SERV] [dbo].[TD_VC_020] NULL,
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[FA_CAM2_EMIS] [dbo].[TD_NU_015_006] NULL,
[FA_CAMB_EXTR] [dbo].[TD_NU_015_006] NULL,
[CO_SUBR] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDMOVI_BA__CO_US__597B3B93] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDMOVI_BA__FE_US__5A6F5FCC] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDMOVI_BA__CO_US__5B638405] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDMOVI_BA__FE_US__5C57A83E] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDMOVI_BANC] WITH NOCHECK ADD CONSTRAINT [CK__TDMOVI_BA__ST_CI__569ECEE8] CHECK NOT FOR REPLICATION (([ST_CIER_DOCU]='N' OR [ST_CIER_DOCU]='S'))
GO
ALTER TABLE [dbo].[TDMOVI_BANC] ADD CONSTRAINT [PK__TDMOVI_B__FF89FA2679DDE984] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDMOVI_BANC] ADD CONSTRAINT [FK__TDMOVI_BANC__5773C2E7] FOREIGN KEY ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC]) REFERENCES [dbo].[TCMOVI_BANC] ([CO_EMPR], [CO_BANC], [CO_UNID_CONC], [NU_CNTA_BANC], [AA_BNCO], [MM_BNCO], [TI_MOVI_BANC], [NU_COMP_BANC])
GO
